package com.fong.spring_cloud_consumer;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;


/**
 * 远程服务连接器
 * @author fong
 *
 */
// 标注将调用spring-cloud-producer服务，当服务不可用时熔断调用 SayHelloServiceImpl中的对应方法
@FeignClient( name = "spring-cloud-producer", fallback = SayHelloServiceImpl.class )
public interface SayHelloService {

	@RequestMapping( value = "/hello" )
	public String hello( @RequestParam( value = "name" ) String name );

}
